#define _CRT_SECURE_NO_WARNINGS 1

#include<bits/stdc++.h>

using namespace std;

int main()
{
	set<pair<double, double> > hash;

	int cnt = 0;
	for (int x1 = 0; x1 < 20; x1++)
	{
		for (int y1 = 0; y1 < 21; y1++)
		{
			for (int x2 = x1+1; x2 < 20; x2++)
			{
				for (int y2 = 0; y2 < 21; y2++)
				{

					double k = (double)(y1 - y2) / (x1 - x2);
					double b = (double)(x1*y2-x2*y1)/(x1-x2);

					hash.insert({ k,b });
				}
			}
		}
	}

	cout << hash.size()+20;

	return 0;
}


#include<bits/stdc++.h>

using namespace std;

typedef long long ll;


int main()
{
	ll t;

	cin >> t;

	t /= 1000;

	int hour = t / 60 / 60 % 24;
	int min = t / 60 % 60;
	int sec = t % 60;

	printf("%02d:%02d:%02d\n", hour, min, sec);

	return 0;
}